package com.gohome.gohomechat.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.gohome.gohomechat.model.entify.Contant;

/**
 * Created by dllo on 16/3/3.
 */
public class NoticeSQLiteHelper extends SQLiteOpenHelper {

    private String sql = "create table " + Contant.TABLE_NOTICE + " (msgId integer primary key autoincrement, head text, username text,reason text," +
            "time integer, messagestatus integer, groupid text, groupname text)";

    public NoticeSQLiteHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
